<!DOCTYPE HTML>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>商之联后台管理系统</title>
  <meta name="description" content="商之联后台管理系统">
  <meta name="keywords" content="form">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="{:C('SUPPLIER_ADMIN_IMAGE')}favicon.png">
  <link rel="apple-touch-icon-precomposed" href="{:C('SUPPLIER_ADMIN_IMAGE')}app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="{:C('SUPPLIER_ADMIN_CSS')}amazeui.min.css"/>
  <link rel="stylesheet" href="{:C('SUPPLIER_ADMIN_CSS')}admin.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->
<!-- header start-->

<include file="Public:header"/>

<!-- header end-->
<div class="am-cf admin-main">
<!-- sidebar start -->
   <include file="Public:menu"/>
  <!-- sidebar end -->

<!-- content start -->
<div class="admin-content">

  <div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商品管理</strong> / <small>添加商品</small></div>
  </div>

  <div class="am-tabs am-margin" data-am-tabs>
    <ul class="am-tabs-nav am-nav am-nav-tabs">
      <li class="am-active"><a href="#tab1">基本信息</a></li>
    </ul>

    <div class="am-tabs-bd">
    <!-- 商品基本信息-->
      <div class="am-tab-panel am-fade am-in am-active" id="tab1">
        <div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">顶级类目</div>
          <div class="am-u-sm-10">
            <select  id="leim" onchange="javascript:second();">
            <option>请选择</option>
            <foreach name="toptype" item="types" key="key">
      
              <option value="{$key}">{$types}</option>
              </foreach>
            </select>
          </div>
        </div>
        <div class="am-tab-panel am-fade am-in am-active" id="tab1">
        <div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">二级类目</div>
          <div class="am-u-sm-10">
            <select name='itemtype' id="setype" onchange="reload(this.options[this.options.selectedIndex].value)">
            <option>请选择</option>
           
            </select>
          </div>
        </div>
  		
  		<div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">商品名称</div>
          <div class="am-u-sm-10">
            <div class="am-btn-group" data-am-button>  
                <input type="text" name="options" id="option1">
            </div>
          </div>
        </div>
		
		<div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">商品型号</div>
          <div class="am-u-sm-10">
            <div class="am-btn-group" data-am-button>  
                <input type="text" name="options" id="option1">
            </div>
          </div>
        </div>
        <hr/>
        <div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">商品价格</div>
          <div class="am-u-sm-10">
            <div class="am-btn-group" data-am-button>  
                <input type="text" name="options" id="option1">
            </div>
          </div>
        </div>

        <div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">市场价格</div>
          <div class="am-u-sm-10">
            <div class="am-btn-group" data-am-button>  
                <input type="text" name="options" id="option1">
            </div>
          </div>
        </div>

      </div>
	<!-- 商品基本信息end-->

    </div>
  </div>

  <div class="am-margin">
    <button type="button" class="am-btn am-btn-primary am-btn-xs">提交保存</button>
    <button type="button" class="am-btn am-btn-primary am-btn-xs">重置</button>
  </div>
</div>
<!-- content end -->

</div>


<script src="{:C('ADMIN_JS')}jquery.min.js"></script>
<include file="Public:footer"/>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/rem.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/respond.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}amazeui.legacy.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="{:C('SUPPLIER_ADMIN_JS')}amazeui.min.js"></script>
<!--<![endif]-->
<script src="{:C('SUPPLIER_ADMIN_JS')}app.js"></script>
<script type="text/javascript">
 function reload(x){
 	var typeid=x;
    window.location.href="{:U(Item/addItem)}"+"?typeid="+typeid;
 }
</script>
<script type="text/javascript">
  //获取二级类目
  function second(){
   var top=$('#leim').val();
    jQuery.get('{:U("Item/stype")}',
      {typeid:top,},
      function(data){
       /// $('#setype option').remove("option[value !=0]");
 $('#setype').append(data); 

      },'text');

  
}

</script>

</body>
</html>
